
//
//  PayEndModel.m
//  TenThousand
//
//  Created by apple on 16/7/21.
//  Copyright © 2016年 baixue. All rights reserved.
//

#import "PayEndModel.h"

@implementation PayEndModel

- (id)initWithDictionary:(NSDictionary *)dic {
    if (self = [super init]) {
        
        self.ProjeceName = [self stringWithNSObject:[dic objectForKey:@"PrjectName"]];
        self.Code = [self stringWithNSObject:[dic objectForKey:@"Code"]];
        self.Amount = [self stringWithNSObject:[dic objectForKey:@"Amount"]];
        self.Tearm = [self stringWithNSObject:[dic objectForKey:@"Tearm"]];
        self.Ratexx = [self stringWithNSObject:[dic objectForKey:@"Rate"]];
        self.Satexx = [self stringWithNSObject:[dic objectForKey:@"Sate"]];
        self.interest = [self stringWithNSObject:[dic objectForKey:@"interest"]];
        self.AddDate = [self stringWithNSObject:[dic objectForKey:@"AddDate"]];
        
    }
    return self;
}

-(NSString*) stringWithNSObject:(id)_it
{
    if ([_it isKindOfClass:[NSNull class]]) {
        return @"";
    }
    
    if ([_it isKindOfClass:[NSString class]]) {
        return _it;
    }
    
    NSNumber* _num = (NSNumber*)_it;
    return [_num stringValue];
    
}


@end
